package com.dragon.repository.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * <p>
 * 出入库
 * </p>
 *
 * @author sy
 * @since 2023-11-14
 */
@Getter
@Setter
@TableName("dragon_warehouse_inout")
public class WarehouseInout implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 出入库单号
     */
    private String inoutCode;

    /**
     * 出入库：1出库 2入库
     */
    private Integer inoutType;

    /**
     * 主表id
     */
    private Integer claimId;

    /**
     * 仓库经手人id
     */
    private Integer responsibleId;

    /**
     * 出入库时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date inoutTime;

    /**
     * 仓库id
     */
    private Integer warehouseId;

    /**
     * 类型：1领用 2盘点 3调拨 4采购
     */
    private Integer type;

    /**
     * 是否确认 ：0否 1是
     */
    private Integer isPassed;

    /**
     * 仓库名称
     */
    @TableField(exist = false)
    private String warehouseName;

    /**
     * 领用人名称
     */
    @TableField(exist = false)
    private String userName;

    /**
     * 部门名称
     */
    @TableField(exist = false)
    private String departmentName;

    /**
     * 经办人名称
     */
    @TableField(exist = false)
    private String operatorName;

    /**
     * 领用出入list
     */
    @TableField(exist = false)
    private List<InoutProduct> inoutProductList;


}
